<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<jsp:include page="title.jsp"/>
<meta charset="utf-8"/>
 <meta name="keywords" content="贷款，信用贷，分期，借款，万八千，信用借款，借款5000元，小额现金贷" />
  <meta name="description" content="万八千提供快速的小额借款服务。可以借款5000元、无抵押、无担保、万八千是一款针对成人白领市场的消费金融产品，通过互联网、大数据等科技手段，为用户提供短期的信用借贷，解决用户资金周转问题。"/>
<link href="css/style.css" rel="stylesheet"/>
<link rel="stylesheet" type="text/css" href="css/normalize.css" />
<link rel="stylesheet" type="text/css" href="css/default.css">
<link href="css/jquery.ui.datepicker.css" rel="stylesheet" type="text/css" />
<script src="js/jqbase.js"></script>
<script src="myjs/gy.js"></script>
</head>
<body style="background:#eaedf1;">
<jsp:include page="top.jsp"/>
	<div class="backstage no-mar">
		<div class="tab_cont" style="display:block">
			<dl>
				<dd><span class="p_span">原始密码：</span><input style="height:30px;" id="pwd"></dd>
				<dd><span class="p_span">设置密码：</span><input type="password" style="height:30px;" id="pwd1"><em>*</em><i>长度为6~16位字符</i></dd>
				<dd><span class="p_span">确认密码：</span><input type="password" style="height:30px;" id="pwd2"></dd>
			</dl>
			<div class="strong">
				<a class="actived" id="editPwd">保存</a>
			</div>
		</div>
	</div>
<jsp:include page="foot.jsp"/>
<jsp:include page="left.jsp"/>
</body>
<script type="text/javascript">
$(function(){
	//单击修改密码按钮
	$("#editPwd").click(function(){
		var pwd=$("#pwd").val();
		var pwd1=$("#pwd1").val();
		var pwd2=$("#pwd2").val();
		var l= pwd1.length;
		if(l>5 && l<17){
		$.ajax({
			url:'editPwd',
			type:'post',
			dataType:'json',
			data:{"pwd":pwd,"pwd1":pwd1,"pwd2":pwd2},
			success:function(data){
				alert(data.msg);
				if(data.status==0){
					location.href="index.html";
				}
			},
			error:function(data){
				alert(errMsg);
			}
		})
		}else{
			alert("你输入密码格式有误")
		}
	})
})

</script>
</html>